<template>
<view class="container">
	<form @submit="formSubmit">
	  <input type="hidden" name="cusid" :value="tijiao.cusid" />
	  <input type="hidden" name="appid" :value="tijiao.appid" />
	  <input type="hidden" name="version" :value="tijiao.version" />
	  <input type="hidden" name="randomstr" :value="tijiao.randomstr" />
	  <input type="hidden" name="trxamt" :value="tijiao.trxamt" />
	  <input type="hidden" name="reqsn" :value="tijiao.reqsn" />
	  <input type="hidden" name="charset" :value="tijiao.charset" />
	  <input type="hidden" name="returl" :value="tijiao.returl" />
	  <input type="hidden" name="notify_url" :value="tijiao.notify_url" />
	  <input type="hidden" name="body" :value="tijiao.body" />
	  <input type="hidden" name="remark" :value="tijiao.remark" />
	  <input type="hidden" name="randomstr" :value="tijiao.randomstr" />
	  <input type="hidden" name="signtype" :value="tijiao.signtype" />
	  <input type="hidden" name="sign" :value="tijiao.sign" />
	 <button form-type="submit">Submit</button>
	</form>
</view>
</template>

<script>
var app = getApp();

export default {
	data() {
		return {
			tijiao:{},
		};
	},

	onLoad: function (opt) {
		this.tijiao = app.getopts(opt);
	},

  methods: {
		formSubmit: function(e) {
			
			var res = e.detail.value;
		
		    uni.request({
		   	header: {
		   		'Content-Type':'application/x-www-form-urlencoded'  
		   	}, 
		   	url: res.url,
		   	method: 'POST',
		   		data: {
		   			cusid: res.cusid,
		   			appid: res.appid,
		   			version: res.version,
		   			randomstr: res.randomstr,
		   			trxamt: res.trxamt,
		   			reqsn: res.reqsn,
		   			charset: res.charset,
		   			returl: res.returl,
		   			notify_url: res.notify_url,
		   			body: res.body,
		   			remark: res.remark,
		   			randomstr: res.randomstr,
		   			signtype: res.signtype,
		   			sign: res.sign
		   		},
		   	dataType:'json',
		   	success: (res) => {
		   		console.log(res);
		   	} 
		   });
		},
	
  }
}
</script>
<style>
.top{width:100%;display:flex;flex-direction:column;align-items:center;padding-top:60rpx}
.top .f1{height:60rpx;line-height:60rpx;color:#939393;font-size:24rpx;}
.top .f2{color:#101010;font-weight:bold;font-size:72rpx;height:120rpx;line-height:120rpx}
.top .f3{color:#101010;font-weight:bold;font-size:72rpx;height:40rpx;line-height:40rpx}
.top .f2 .t1{font-size:44rpx}
.top .f3 .t3{font-size:30rpx}
.top .f4{height:60rpx;line-height:120rpx;color:#939393;font-size:24rpx;}
</style>